import os


class RoxySearch:

    def __init__(self):

        self.file_db = []

    def scan(self):

        for url in ("C:\\", "D:\\", "E:\\", "F\\", "G:\\", "H:\\"):  # 如果有更多磁盘，可以继续添加
            for root, dirs, files in os.walk(url):
                for file in files:
                    self.file_db.append(os.path.join(root, file))

        # os.system("cls")
        print("文件扫描完成")

    def check(self, filename):

        new_file_db = []

        for file in self.file_db:
            if filename in file:
                new_file_db.append(file)

        list = []

        for num, add_new_file in enumerate(new_file_db):
            # print(num + 1, add_new_file)
            list.append(add_new_file)

        return list